package org.nanotek.lucene;

import java.nio.file.Path;
import java.util.Collection;

import org.apache.lucene.index.IndexWriterConfig.OpenMode;
import org.apache.lucene.util.Version;
import org.nanotek.StringKong;
import org.nanotek.lucene.index.search.AnalyzerType;
import org.nanotek.lucene.index.search.IndexType;
import org.nanotek.util.Base;

@SuppressWarnings("serial")
public class IndexConfig extends StringKong implements Base<String> {


	private Path indexPath;
	private Version version;
	private OpenMode openMode;
	private IndexType indexType;
	private AnalyzerType analyzerType;
	//TODO:Implement the stopWords collection configuration.
	private Collection<?> stopWords;
	private Boolean ignoreCase = false;



	public IndexConfig(String id) {
		super(id);
	}

	public IndexConfig() {
		super(Long.toString(System.currentTimeMillis()));
	}


	public Version getVersion() {
		return version;
	}


	public void setVersion(Version version) {
		this.version = version;
	}


	public OpenMode getOpenMode() {
		return openMode;
	}


	public void setOpenMode(OpenMode openMode) {
		this.openMode = openMode;
	}


	public Path getIndexPath() {
		return indexPath;
	}


	public void setIndexPath(Path indexPath) {
		this.indexPath = indexPath;
	}


	public IndexType getIndexType() {
		return indexType;
	}

	public void setIndexType(IndexType indexType) {
		this.indexType = indexType;
	}


	public AnalyzerType getAnalyzerType() {
		return analyzerType;
	}

	public void setAnalyzerType(AnalyzerType analyzerType) {
		this.analyzerType = analyzerType;
	}

	public Collection<?> getStopWords() {
		return stopWords;
	}

	public void setStopWords(Collection<?> stopWords) {
		this.stopWords = stopWords;
	}

	public Boolean getIgnoreCase() {
		return ignoreCase;
	}

	public void setIgnoreCase(Boolean ignoreCase) {
		this.ignoreCase = ignoreCase;
	}

	@Override
	public String getId() {
		return innerKong;
	}

}
